<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var grade = Math.round(Math.random() * 100);
    var grade = 91;
    console.log(grade);

    debugger;

    // 选择结构的嵌套 
    // 在满足特定条件的情况下 进行二次判断(条件依赖)

    if (grade >= 90) {  // 90-100
      // 如果分数是100(666)  90-99(优秀)
      if (grade == 100) {
        document.write("满分,666<br>");
      } else {// [90,100)
        document.write(grade + "分,优秀<br>");
      }
    } else if (grade >= 80) { // grade>=80&&grade<90
      document.write(grade + "分,良好<br>");
    } else if (grade >= 70) { // grade>=70&&grade<80
      document.write(grade + "分,一般<br>");
    } else if (grade >= 60) { // grade>=60&&grade<70
      document.write(grade + "分,危险<br>");
    } else { // grade<60
      // 55 - 60  (抢救下  看下机试)
      // <55  不及格
      if (grade >= 55) {
        document.write(grade + "分,我觉得还能抢救一下<br>");
      } else {
        document.write(grade + "分,恭喜你,二次回城<br>");
      }

    }




  </script>
</body>

</html>